package cas.ihep.spark.util;

import java.util.Map;

public interface NamedResourceManager extends Map<String,Object> {
    Object get(String key);
    Object put(String key,Object value);
    default <T> T get(String key,Class<T> klass){
        Object ret=get(key);
        if(klass!=null && klass.isInstance(ret)){
            return klass.cast(ret);
        }
        return null;
    }
}
